import request from "@/utils/request";

/**
 * 获取指挥部列表
 */
export function QueryCommanderPageList(data: any) {
  return request({
    url: "api/v1/sysuser/commander/page",
    method: "get",
    params: data,
  });
}

/**获取指挥部详情 */
export function GetCommanderDetail(id: any) {
  return request({
    url: "api/v1/sysuser/commander/" + id,
    method: "get",
  });
}

//修改建设单位信息
export function updateCommander(id: number, data: any) {
  return request({
    url: "/api/v1/sysuser/commander/" + id,
    method: "put",
    data: data,
  });
}

//删除建设单位信息
export function deleteCommander(id: number) {
  return request({
    url: "/api/v1/sysuser/commander/" + id,
    method: "delete",
  });
}

/**
 * 重置密码
 * @param id
 */
export function ResetPassword(id: number, password: string) {
  return request({
    url: "/api/v1/sysuser/commander/resetPassword/" + id,
    method: "put",
    params: {
      password: password,
    },
  });
}
